home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / midifi1a / form1.frm next >
Text File  |  1999-10-02  |  2KB  |  85 lines

  1. VERSION 5.00
  2. Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
  3. Object = "{C1A8AF28-1257-101B-8FB0-0020AF039CA3}#1.1#0"; "MCI32.OCX"
  4. Begin VB.Form Form1 
  5.    Caption         =   "Midi Player."
  6.    ClientHeight    =   4410
  7.    ClientLeft      =   60
  8.    ClientTop       =   345
  9.    ClientWidth     =   8565
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   4410
  12.    ScaleWidth      =   8565
  13.    StartUpPosition =   3  'Windows Default
  14.    Begin VB.Timer Timer1 
  15.       Enabled         =   0   'False
  16.       Interval        =   10
  17.       Left            =   7470
  18.       Top             =   855
  19.    End
  20.    Begin VB.ListBox List1 
  21.       Height          =   3960
  22.       Left            =   0
  23.       TabIndex        =   2
  24.       Top             =   0
  25.       Width           =   6765
  26.    End
  27.    Begin MCI.MMControl MMControl1 
  28.       Height          =   510
  29.       Left            =   6795
  30.       TabIndex        =   1
  31.       Top             =   3465
  32.       Width           =   1695
  33.       _ExtentX        =   2990
  34.       _ExtentY        =   900
  35.       _Version        =   327680
  36.       PrevVisible     =   0   'False
  37.       NextVisible     =   0   'False
  38.       BackVisible     =   0   'False
  39.       StepVisible     =   0   'False
  40.       RecordVisible   =   0   'False
  41.       EjectVisible    =   0   'False
  42.       DeviceType      =   "Sequencer"
  43.       FileName        =   ""
  44.    End
  45.    Begin ComctlLib.ProgressBar ProgressBar1 
  46.       Height          =   330
  47.       Left            =   0
  48.       TabIndex        =   0
  49.       Top             =   4050
  50.       Width           =   8520
  51.       _ExtentX        =   15028
  52.       _ExtentY        =   582
  53.       _Version        =   327682
  54.       Appearance      =   1
  55.    End
  56. End
  57. Attribute VB_Name = "Form1"
  58. Attribute VB_GlobalNameSpace = False
  59. Attribute VB_Creatable = False
  60. Attribute VB_PredeclaredId = True
  61. Attribute VB_Exposed = False
  62. Public Sub PlayMusic(filename As String)
  63. Timer1.Enabled = False
  64. MMControl1.Command = "Stop"
  65. MMControl1.Command = "Close"
  66. MMControl1.filename = filename
  67. MMControl1.Command = "Open"
  68. MMControl1.Command = "Play"
  69. Timer1.Enabled = True
  70. End Sub
  71. Private Sub Form_Unload(Cancel As Integer)
  72. MMControl1.Command = "Stop"
  73. MMControl1.Command = "Close"
  74. End Sub
  75.  
  76. Private Sub List1_Click()
  77. PlayMusic List1.Text
  78. End Sub
  79.  
  80.  
  81. Private Sub Timer1_Timer()
  82. ProgressBar1.Max = MMControl1.Length
  83. ProgressBar1.Value = MMControl1.Position
  84. End Sub
  85.